Learning Objectives

After completing this lesson, you'll be able to:

In this lesson, you will:

Learning Objectives

After completing this lesson, you'll be able to:

In this lesson, you will:

Resources

Input Geometry to Workspaces

From a workspace app interface, users can input geometry into workspaces for processing using parameters. Users can upload datasets through a File/Folder/URL parameter that the workspace processes, or you can configure a spatial parameter to accept input in GeoJSON or XML format. 

With a File/Folder/URL parameter, your workspace must use a Reader or FeatureReader to read the input data before transforming it. In most scenarios, you will clip, join, or merge another dataset to the user's data. 

       

Note

For more training on inputting source datasets to workspaces through parameters, please see the Input Source Data at Runtime lesson in Manage FME Flow Data and Connections. 

If you have the user input geometry through a spatial Define Geometry parameter, the easiest method to transform the GeoJSON or XML into a geometric feature is to use a GeometryReplacer.

       

Note

For more training on creating the Define Geometry parameter to use on FME Flow, please see the Get Geometry Input from Users lesson in Build Self-Serve Workflows with Parameters. 

Define Geometry Parameter Interactive Web Map

When you run a workspace with a Define Geometry parameter, the parameter enables an interactive web map in FME Flow that lets you draw a point, line, or area of interest to input into the workspace. The map icon next to the parameter opens the interactive web map. 

From the web map, you can only input the geometry types set up in the user parameter in the workspace, which you select from the top, then draw or choose the location on the map. 

You may collapse the pop-up map by clicking and expand the menu in the inline mapfor the option to pop it out into its own window. 

Note

For more information on the Define Geometry parameter and setting custom basemaps for the web map in FME Flow, please see Using the Geometry Parameter.

Exercise

Jennifer, a GIS Specialist, wants to give transit data to colleagues who only ever need one neighborhood at a time. Her workspace already lets the app user pick layers, an output format, and a coordinate system, but it always returns the whole city. She needs a spatial geometry parameter that lets the app user draw the area they need data for.

In this exercise, you will:

1) Open the Starting Workspace

The workspace begins by creating geometry and reprojecting it. The FeatureReader reads in the transit data from Transit.gdb, then a Clipper clips it to the input geometry. If the output format is OGC KML, the workspace styles each feature type before writing it to the file. 

2) Inspect the Existing Parameters

3) Create the Geometry Parameter

4) Link the Geometry Parameter

5) Run the Workspace

{"type":"Polygon","coordinates":[[[-123.116202,49.275826],[-123.116202,49.280585],[-123.10479,49.280585],[-123.10479,49.275826],[-123.116202,49.275826]]]}

6) Publish to FME Flow

Publish to FME Flow
After you build your workflows in FME Workbench, transfer them to FME Flow through the publishing process. To publish a workspace to FME Flow, complete all steps in the publishing wizard.  
1. Click Publish in the FME Flow Connection toolbar. The publishing wizard window will open.
2. Confirm your FME Flow Connection lists the correct connection and successfully connects to your FME Flow.
3. Select a repository to house the workspace on FME Flow from the drop-down options. To create a new repository, click New and enter its details. 
4. Optionally, you may Upload data files to publish the workspace's source data files to FME Flow along with the workspace. You can control which files to upload from the Select Files... option. 
5. Click Next to move on to the next step.
6. If your workspace uses any connections, the Upload Connections section will appear. You can select whether to publish the connections to FME Flow. 
7. Register Services is the last publishing step. Select the transformation services you want your workspace to be able to use on FME Flow. 
8. Click Publish. 
9. The translation log generates a summary of publishing and provides a direct link to open the workspace on FME Flow. 
For more information on the FME Flow services and publishing to FME Flow, see Deploy Workspaces on FME Flow. 

7) Create the Workspace App

8) Run the Workspace App

You have successfully built another self-serve web app, adding the ability to clip output data to a specific area of interest by linking user-input geometry to the workspace. 

 

Resources

Input Geometry to Workspaces

From a workspace app interface, users can input geometry into workspaces for processing using parameters. Users can upload datasets through a File/Folder/URL parameter that the workspace processes, or you can configure a spatial parameter to accept input in GeoJSON or XML format. 

With a File/Folder/URL parameter, your workspace must use a Reader or FeatureReader to read the input data before transforming it. In most scenarios, you will clip, join, or merge another dataset to the user's data. 

       

Note

For more training on inputting source datasets to workspaces through parameters, please see the Input Source Data at Runtime lesson in Manage FME Flow Data and Connections. 

If you have the user input geometry through a spatial Define Geometry parameter, the easiest method to transform the GeoJSON or XML into a geometric feature is to use a GeometryReplacer.

       

Note

For more training on creating the Define Geometry parameter to use on FME Flow, please see the Get Geometry Input from Users lesson in Build Self-Serve Workflows with Parameters. 

Define Geometry Parameter Interactive Web Map

When you run a workspace with a Define Geometry parameter, the parameter enables an interactive web map in FME Flow that lets you draw a point, line, or area of interest to input into the workspace. The map icon next to the parameter opens the interactive web map. 

From the web map, you can only input the geometry types set up in the user parameter in the workspace, which you select from the top, then draw or choose the location on the map. 

You may collapse the pop-up map by clicking and expand the menu in the inline mapfor the option to pop it out into its own window. 

Note

For more information on the Define Geometry parameter and setting custom basemaps for the web map in FME Flow, please see Using the Geometry Parameter.

Exercise

Jennifer, a GIS Specialist, wants to give transit data to colleagues who only ever need one neighborhood at a time. Her workspace already lets the app user pick layers, an output format, and a coordinate system, but it always returns the whole city. She needs a spatial geometry parameter that lets the app user draw the area they need data for.

In this exercise, you will:

1) Open the Starting Workspace

The workspace begins by creating geometry and reprojecting it. The FeatureReader reads in the transit data from Transit.gdb, then a Clipper clips it to the input geometry. If the output format is OGC KML, the workspace styles each feature type before writing it to the file. 

2) Inspect the Existing Parameters

3) Create the Geometry Parameter

4) Link the Geometry Parameter

5) Run the Workspace

{"type":"Polygon","coordinates":[[[-123.116202,49.275826],[-123.116202,49.280585],[-123.10479,49.280585],[-123.10479,49.275826],[-123.116202,49.275826]]]}

6) Publish to FME Flow

Publish to FME Flow
After you build your workflows in FME Workbench, transfer them to FME Flow through the publishing process. To publish a workspace to FME Flow, complete all steps in the publishing wizard.  
1. Click Publish in the FME Flow Connection toolbar. The publishing wizard window will open.
2. Confirm your FME Flow Connection lists the correct connection and successfully connects to your FME Flow.
3. Select a repository to house the workspace on FME Flow from the drop-down options. To create a new repository, click New and enter its details. 
4. Optionally, you may Upload data files to publish the workspace's source data files to FME Flow along with the workspace. You can control which files to upload from the Select Files... option. 
5. Click Next to move on to the next step.
6. If your workspace uses any connections, the Upload Connections section will appear. You can select whether to publish the connections to FME Flow. 
7. Register Services is the last publishing step. Select the transformation services you want your workspace to be able to use on FME Flow. 
8. Click Publish. 
9. The translation log generates a summary of publishing and provides a direct link to open the workspace on FME Flow. 
For more information on the FME Flow services and publishing to FME Flow, see Deploy Workspaces on FME Flow. 

7) Create the Workspace App

8) Run the Workspace App

You have successfully built another self-serve web app, adding the ability to clip output data to a specific area of interest by linking user-input geometry to the workspace.